<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache" http-equiv="Cache-Control">
    <link href="../demo.css" rel="stylesheet"/>
    <title>RewriteHandler</title>
</head>
<body>
<div class="topnav">
    <a class="menu" href="http://localhost:8080/">Demo Home</a>
    <a class="menu"
       href="https://github.com/jetty/jetty.project/tree/jetty-12.0.x/jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/">Source</a>
    <a class="menu" href="https://jetty.org/">Jetty Project Home</a>
    <a class="menu" href="https://jetty.org/docs/">Documentation</a>
    <a class="menu" href="https://webtide.com">Commercial Support</a>
</div>

<div class="content">
    <h1>Links to test the RewriteHandler</h1>
    <p>All examples below were configured using <code>etc/jetty-rewrite.xml</code>.</p>

    <h2>Internal URI rewrite</h2>
    <dl>
        <dt><a href="../some/old/context">Rewrite "../some/old/context" to "../rewritten/newcontext"</a></dt>
        <dd>This demo shows how the entire request URI can be internally rewritten to point to another context, using
            simple text matching
        </dd>

        <dt><a href="../rewrite/for/beginning">Rewrite "../rewrite/for/beginning" to "../rewritten/beginning"</a></dt>
        <dd>This demo shows how the beginning of the request URI can be rewritten, while keeping the ending section</dd>

        <dt><a href="../rewritten/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar" using regex</a></dt>
        <dd>This demo shows how sections of the request URI can be rearranged. It uses regex to parse out each section,
            and then return them in reverse order
        </dd>

        <dt><a href="../rewrite/for/reverse/bar/foo">Rewrite the beginning, and reverse the path sections</a></dt>
        <dd>This demo shows how rewrite patterns can be chained.</dd>

        <dt><a href="../dump/reverse/bar/foo">Rewrite "bar/foo" to "foo/bar", full dump view</a></dt>
        <dd>This demo rewrites "bar/foo" to "foo/bar" the same as earlier, but shows a full dump of the request</dd>

        <h2>Redirect</h2>
        <dt><a href="../redirect/this">Redirect "../redirect/this" to "../redirected/this"</a></dt>
        <dd>This demo redirects the request in a manner visible to the user agent, instead of doing an internal
            rewrite.
        </dd>

        <h2>Cookie</h2>
        <dt>All pages</dt>
        <dd>This demo rule sets a "visited" cookie for each page you visit. The second time you go to any of the links
            above, you will see an additional line, "Previously visited: yes".
        </dd>

        <h2>Response Code</h2>
        <dt><a href="../400Error">Return a 400 error status</a></dt>
        <dd>This demo shows how to modify the response code of a page to an error, based on its URL</dd>
    </dl>
</div>

<div class="footer">
    <center><a href="https://eclipse.dev/jetty"><img src="../small_powered_by.gif" style="border:0"/></a></center>
</div>


</body>
</html>
